home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
serial
/
statseri.000
/
statseri
/
statserial-1.1
/
phone_log
< prev
next >
Wrap
Text File
|
1994-12-14
|
462b
|
19 lines
#!/bin/bash
#
# This script uses statserial to check the Ring Indicator signal of a
# modem. If the phone rings, it displays a message.
#
while true
do
let ringing="`statserial -d /dev/modem` & 128"
if [ $ringing != 0 ]
then
# can either send message to standard out
echo -e "\a(`date`) Incoming Telephone Call"
# or send mail
# echo "Incoming phone call detected." | mail -s "Incoming Phone Call" `whoami`
sleep 10
fi
sleep 1
done